package com.ls.service;

import com.ls.dao.FruitMapper;
import com.ls.entity.Fruit;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("fruitService")
public class FruitServiceImpl implements FruitService {
    @Resource
    private FruitMapper fruitMapper;

    @Override
    public List<Fruit> getAll() {
        return fruitMapper.getAll();
    }

    @Override
    public Fruit getFruitById(Integer id) {
        return fruitMapper.getFruitById(id);
    }

    @Override
    public int del(Integer id) {
        return fruitMapper.del(id);
    }

    public void setFruitMapper(FruitMapper fruitMapper) {
        this.fruitMapper = fruitMapper;
    }
}
